Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customizing badge, button, shape, slider sizes #464

Merged
merged 2 commits into from
May 10, 2022
Merged

Allow customizing badge, button, shape, slider sizes #464

merged 2 commits into from
May 10, 2022

Conversation

redphx
Copy link
Contributor

@redphx redphx commented May 10, 2022

Description

Allows customizing icon sizes of badge, button, shape, slider by declaring these variables in theme YAML:

  • mush-badge-size
  • mush-badge-icon-size
  • mush-button-size
  • mush-button-icon-size
  • mush-shape-size
  • mush-shape-avatar-size
  • mush-shape-icon-size
  • mush-slider-height

image
image
image

Should add these variables to theme's document after merging.

Related Issue

Not entirely fix this issue (it applies to the entire theme, not just template card), but at least it lets users change icon sizes: piitaya/lovelace-mushroom-themes#13

Also #385

Motivation and Context

How Has This Been Tested

Types of changes

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 🌎 Translation (addition or update a translation)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have tested the change locally.

@redphx
Copy link
Contributor Author

redphx commented May 10, 2022

Is there any way to edit theme's YAML in dev environment?

Copy link
Owner

@piitaya piitaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool 👍 Thank you!
I'm wondering if we must split the button and the slider height into 2 variables or not 😅

@piitaya
Copy link
Owner

piitaya commented May 10, 2022

Is there any way to edit theme's YAML in dev environment?

I think you need to create a themes folder next to configuration file and put your theme yaml file in it.

@redphx
Copy link
Contributor Author

redphx commented May 10, 2022

I'm wondering if we must split the button and the slider height into 2 variables or not 😅

Those are two different cards so I think it's better to split them up?

@piitaya
Copy link
Owner

piitaya commented May 10, 2022

Button can be next to slider (fan card, light card). So I think it's better to have the same height for all controls for consistency. Maybe we can add a button ratio variable too if needed.

@redphx
Copy link
Contributor Author

redphx commented May 10, 2022

Feel free to update it!

@piitaya
Copy link
Owner

piitaya commented May 10, 2022

I will merge your PR, do the change and I will ping you 🙂

@piitaya piitaya merged commit 85f588f into piitaya:main May 10, 2022
@piitaya piitaya added the enhancement New feature or request label May 10, 2022
@piitaya piitaya mentioned this pull request May 10, 2022
8 tasks
ulic75 added a commit to ulic75/lovelace-mushroom that referenced this pull request May 12, 2022
* Update Vietnamese translation (piitaya#448)

* Update vi.json

* Change "Chip" to "chip"

* feat(humidifier): add humidifier support (piitaya#346)

* feat(humidifier): card

* feat(humidifier): improve card

* fix: view name

* fix: humidity live

* fix: MushroomBaseElement

* fix: clean unused dependencies

* fix: hacard

* fix: collapsible controls

* fix: remove buttons control

* fix: remove buttons control

* fix(humidifier): some fixes (piitaya#451)

* fix: remove console.log

* feat(media-player): show volume next to state when not unavailable/unknown/off (piitaya#374)

* Show volume next to state

* Revert "Show volume next to state"

This reverts commit c40e32f.

Undo due to suggestion from @acesyde

* Reworked volume state based on feedback

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>

* feat(media-player): add option to display volume level (piitaya#452)

* chore: bump deps (piitaya#453)

* 1.8.0

* Update README.md

* Update German translation (piitaya#458)

* Update de.json

* Update de.json

* Update de.json

* Update zh-Hant.json (piitaya#455)

* Update alarm card documentation according to piitaya#376 (piitaya#459)

* Allow customizing badge, button, shape, slider sizes (piitaya#464)

* Allow customizing badge, button, shape, slider sizes

* Add --shape-avatar-size

* feat(themes): improve css variables (piitaya#466)

* fix(chip): fix avatar size for chip

* fix(chip): add avatar only support (piitaya#468)

* fix(actions): allow scroll within actions (piitaya#469)

* Fix strict error handling in templates (piitaya#472)

* Update German translation (piitaya#474)

* Update de.json

* Update de.json

* Update de.json

* Update de.json

* 1.8.1

* Update README to reflect recent UI changes in HA 2022.5 (piitaya#470)

* fix(ios): fix button size on ios

* 1.8.2

* Update Italian translation (piitaya#478)

Added humidity control translation
Added show volume translation

* 1.8.3

* update for new css variables

Co-authored-by: redphx <96280+redphx@users.noreply.github.com>
Co-authored-by: Pierre-Emmanuel Mercier <acesyde@gmail.com>
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
Co-authored-by: madmurl0c <42262826+madmurl0c@users.noreply.github.com>
Co-authored-by: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Co-authored-by: rhuba8324 <53090204+rhuba8324@users.noreply.github.com>
Co-authored-by: Julien Ehrhart <julien.ehrhart@live.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Doryx <81909485+doryxbirb@users.noreply.github.com>
@Jaguaza
Copy link

Jaguaza commented May 13, 2022

Sorry can someone explain me how to change the size of the icons. I still don't understand how to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants